As that portion of the filament gets smaller, its temperature increases. Remember that as the temperature of a body emitting radiation increases its color spectra is shifted towards blue. As the filament burns out, the small portion burns quickly away, causing it to quickly increase its temperature. The result of this brief increase in temperature is a flash of blue-white light. According to the Stefan-Boltzmann Power Law a blackbody with a temperature of 3 K will have a peak in its wavelength spectra in the microwave region.
Microwaves have long wavelengths, and therefore, low temperatures.
A three-way bulb actually has separate filaments for its power settings. This way, no matter what setting the bulb is at, the active filaments will be at a similar temperature. This temperature corresponds to yellow-white light on the color temperature scale. When you dim a light bulb, causing it to emit less power than it was designed for, its filament will be at a lower temperature than at full power. This lower temperature will correspond to a different colored peak in its power spectrum.