High energy pA collisions in the color glass condensate approach II: quark pair production