Generation of Pure States in a Two Photon Micromaser: Effects of Finite Detuning and Cavity Losses