Here's what I seem to remember. In a rich mixture, all of the fuel doesn't oxidize (burn). However, with the high heat in the combustion chamber, it can vaporize. Vaporization takes up heat, reducing temperature (latent heat of vaporization). Note that top fuel cars run so rich that nitro comes out the headers (hence the flames). They do that for the cooling effect.

One point. Oxygen doesn't burn. It promotes combustion, though.