Can smoke from small fire cause wiring problems?
At only 140 F there should be no problem, 140C on the other hand would have me checking the fixture and wiring insulation to see if anything melted. Most modern homes are wired with NMB wire that is rated for 194F in use (90 C). With the extra heat if an Edison (screw in type lamp) the center contact may have bent away from the lamp causing the flickering. With the power off remove the lamp and using a small screwdriver or other tool reach in and lightly lift the center metal tab, it won't take much and lifting two much can cause the tab to break (1/16 of an inch should be plenty) replace the lamp and see if that fixed the problem. Just a note that if this is a can light recessed in the ceiling they have thermal safety's that do go bad especially if a larger wattage lamp is used (larger than the fixture was designed and listed for)