red or infrared bulbs can be used 24/7. Ball Pythons are nocturnal so they really don't like bright white light at all.
- - - Updated - - -
if it is being controlled by a thermostat it shouldn't be as much of an issue. As long as the lamp as a ceramic socket it should be fine.