Two-photon transitions in optically pumped submillimeter lasers