There is no direct correlation between the wavelength and the flame temperature.
The blue light comes mostly from CH radicals that are formed in the flame and emit light at around 430 nm. This can be clearly seen in e.g. natural gas cooking devices. This color is independent of the flame temperature, so if you would burn with a larger excess of oxygen, the flame temperature would drop, but the flame would still emit blue light (although it will be with less intensity). When a flame colors red then it is usually because the combustion is somehow not optimal (usually there is locally a lack of oxygen) and soot is formed in the flame. Soot is basically carbon molecules, and they glow orange/red in the flame. This happens for instance in candle flames. The extra radiation of the soot lowers the temperature of the flame, so there is some correlation between color and temperature but you can have 'red' flames with a higher temperature than 'blue' flames.