Quantum theory of molecule-surface scattering: Rotational transitions