The Fontaine-Mazur conjecture in the residually reducible case