Ge with a quasi-direct band gap can be realized by strain engineering, alloying with Sn, or ultrahigh n-type doping. In this work, we use all three approaches together to fabricate direct-band-gap Ge-Sn alloys. The heavily doped n-type Ge-Sn is realized with CMOS-compatible nonequilibrium material processing. P is used to form highly doped n-type Ge-Sn layers and to modify the lattice parameter of P-doped Ge-Sn alloys. The strain engineering in heavily-P-doped Ge-Sn films is confirmed by x-ray diffraction and micro Raman spectroscopy. The change of the band gap in P-doped Ge-Sn alloy as a function of P concentration is theoretically predicted by density functional theory and experimentally verified by near-infrared spectroscopic ellipsometry. According to the shift of the absorption edge, it is shown that for an electron concentration greater than 1x10^20 cm-3 the band-gap renormalization is partially compensated by the Burstein-Moss effect. These results indicate that Ge-based materials have high potential for use in near-infrared optoelectronic devices, fully compatible with CMOS technology.