Consider the absolutely irreducible Galois representation $\overline{\rho} \colon G_{\Bbb Q} \to {\mathrm{GL}}_2({\Bbb F}_p)$. We apply the Mazur's deformation theory on the lift ${\rho} \colon G_{\Bbb Q} \to {\mathrm{GL}}_2({\Bbb Z}_p)$ of $\overline{\rho}$ such that
${\mathrm{det}}\rho$ = cyclotomic character
Ramifying primes in ${\rho}$ are exactly the same ones that ramify in $\overline{\rho}$
$\rho$ is finite at $p$. I.e., the restriction of $\rho$ to ${\mathrm{G}}_{{\Bbb Q}_p}$ comes from the finite flat group scheme.
Mazur showed that by using the deformation ring $R(\overline{\rho})$ finitely generated over ${\Bbb Z}_p$, any such lift $\rho$ can be obtained from the universal Galois representation $\rho^{\mathrm{univ}} \colon G_{\Bbb Q} \to {\mathrm{GL}}_2(R(\overline{\rho}))$ followed by the map ${\mathrm{GL}}_2(R(\overline{\rho})) \to {\mathrm{GL}}_2({\Bbb Z}_p)$ induced by the unique ring homomorphism $\psi_{\rho} \colon R(\overline{\rho}) \twoheadrightarrow {\Bbb Z}_p$ corresponding to $\rho$.