Can I safely use a #12 extension cord on a 15A circuit temporarily for extended periods?
The heavier wire (12 AWG as opposed to 14 AWG) wire in the extension cord will reduce the resistance of the cord. For a given load there will be less heating in the cord. However you should consider using as short of cord as possible. Don't use a 25 foot cord if a 10 foot one would work instead. Half the cord length half the resistance.

Be aware that if such extension cord heats up too much it is likely that you are putting too much load on the circuit and the wires in the wall are going to be subject to heating as well. Over heating electrical circuits are dangerous and can lead to fires.