We introduce a quantum virial expansion for the optical response of a doped two-dimensional semiconductor. As we show, this constitutes a perturbatively exact theory in the high-temperature or low-doping regime, where the electrons' thermal wavelength is smaller than their interparticle spacing. We obtain exact analytic expressions for the photoluminescence and we predict new features such as a nontrivial shape of the attractive branch peak related to universal resonant exciton-electron scattering and an associated energy shift from the trion energy. Our theory furthermore allows us to formally unify the two distinct theoretical pictures that have been applied to this system, where we reveal that the predictions of the conventional trion picture correspond to a high-temperature and weak-interaction limit of Fermi-polaron theory. Our results are in excellent agreement with recent experiments on doped monolayer MoSe_{2} and they provide the foundation for modeling a range of emerging optically active materials such as van der Waals heterostructures.