I'm sorry to say to you all that LanduytG is closest to having it right. Within the realm of Diesel engines, more fuel for a given amount of air results in increasing temperature. I will expound on this in a moment
I believe the confusion stems from the concept of stoichiometry and stratification.
A very basic observation in combustion is that, regardless of fuel, flame temperatures are at a maximum at a point very close to the stoichiometric air/fuel ratio. On fact, This peak occurs very slightly lean of stoichiometric, around Lambda = 1.1 for many hydrocarbon fuels. It its not entirely coincidence that NOx peaks also at the same Lambda value.
The second basic tenet one needs to understand is the difference between a homogeneneous charge and a stratified charge, because that is where gasoline and Diesel engines begin to diverge.
Gasoline engines (except specific stratified-charge designs) operate under a homogeneous charge, where fuel and air are pre-mixed at a uniform air-fuel ratio throughout the combustion chamber at the time of ignition.
In contrast, a Diesel engine, which injects the entire fuel charge within a short window in terms of crank angle, has a decidedly non-homogeneous, or stratified charge. This means that within the volume of the combustion chamber (i.e. the piston bowl), there are extremely lean and extremely rich regions, and everything in between. Combustion initiates at sites that are sufficiently hot and having air fuel ratios within the range of combustible limits, starting with the sites that are near stoichiometric.
Much research and development by engineers is focussed on making the mixing of fuel and air as rapidly and evenly as possible within this extremely short window of time, which has spurred the development of high-pressure fuel injection and injection rate shaping strategies, since the above-described stratification results in both unacceptable levels of NOx and soot emissions.
Limiting our discussion to Diesel engines, we first have to distinguish a global, or overall, air-fuel ratio, as well as a local one. A Diesel engine ALWAYS operates at a globally lean air-fuel ratio; the engine would reach a limit of unacceptable smoke emissions around 18:1. When an engine is idling or operating at low load, the global A/F ratio can be much higher, like 100:1.
Regardless, even through the engine is operating globally lean, there are sites as said before that are extremely lean and extremely rich. The interface of the flame with the rich regions are sites of soot production and the locale of combustion in the stoichiometric and lean-of stoichiometric regions generate much of the NOx.
The only time when combustion temperatures can go down in a relatively rich mixture in a Diesel engine is when the engine is grossly overfuelled, such that the extremely-rich sites I described above dominate in the entire combustion chamber, which is manifested by extreme smoking.
It is important here to note that, whether Diesel engine or gasoline, EGT cannot be taken as a direct, 1:1, relationship with flame temperature nor peak cycle temperature. A very lean-burning gasoline engine will have low peak cycle temps but soaring EGT. Similar analogies can be made for Diesel engines.
Take home message #1 is that you need to understand basic concepts of stoichiometry and how flame temperature is a function of this stoichiometry; how they are different between Diesel and gasoline engines; the difference between a homogeneous charge and a stratified-charge; and the difference between global- and local stoichiometry.
The take home message #2 is that within the normal range of air-fuel ratios seen in a Diesel engine, more fuel = more heat = higher combustion temperature.
Take home message #3 is that EGT does not tell the full story about peak combustion temperature.