Adiabatic elimination, the rotating-wave approximation and two-photon transitions