It depends. There are rules for headlights, so read the book carefully. If you would be so kind as to give us the make and model of the bike we might be able to give you a more definitive answer. But -- some bikes do run in "naked" classes while carrying the factory headlight. I can think of a "standard" bike, with older-style round headlight (which size and shape is dicussed in the rules) and also a metric bike with the factory headlight assembly mounted right where it oughta be.
So -- what bike?