Theory of the nonequilibrium phase transition for nematic liquid crystals under shear flow