Thermal variation of attenuation for optical fibers