Im gonna explain this three ways because ive found that its a hard subject to explain to nonbiology majors...
The protein isnt formed in the right configuration for wing use due to a defective gene in the flightless flies. However, that protein forms correctly at higher temperatures, allowing them to fly. The fliers produced from this circumstance are still genetically flightless, so any offspring they produce with other genetically flightless flies would result in flightless flies if their flight proteins are manufactured in lower temps. The wingless fruit flies dont have wings, so that flightless protein mutation doesnt affect them either way. Breaking/fixing the motor of an airplane doesnt matter if the airplane has no wings.
Imagine one of the belts in your car that allows a function to be performed. Now imagine that that belt becomes kinked and doesnt allow that function to occur if the car is built in 75 degree weather. If built in 90 degree weather, the belt is able to be straightened out and allows its function to be performed. Proteins are like that. Their shape allows things to happen. Under different conditions while being constructed, they form into different shapes.
Akin to coal, diamonds, and graphite all being pure carbon, just formed in different conditions so they have different properties. A coal engagement ring wouldnt impress, and a diamond pencil wouldnt write. Change the conditions that they are made (different amounts of heat and pressure) and their function changes.