Cavity QED quantum phase gates for a single longitudinal mode of the intracavity field