Theory of laser cooling of semiconductor quantum wells