You can simply "break" that one sale into two sales, one for the stocks acquired via the RSUs and the other for the stocks acquired via the ESPP. You allocate the proceeds based on the shares in each group. If the stocks were acquired after 2010 then it's almost certain any basis shown on the 1099-B is for the ESPP shares only as brokers are only required to report the "out of pocket" cost to acquire the stock and for RSUs that's typically $0.
Don't worry the the IRS will somehow come down on you because you've split up the sale. Their "matching" process is "fuzzier" then that and your REAL obligation as a taxpayer is to report your income CORRECTLY, not slavishly match numbers on little pieces of government-approved pieces of paper.
Tom Young