Excitonic effects on the two-photon transition rate in quantum wells