removing ceiling fan and installing a light fixture
So, it's not the fan that has that wiring config, that's the romex feeding the box; right? 

The fan likely has a blue wire, or another of some color, which is used to independently switch the light kit. So, the short answer is yes but you'll have to figure out which wire in the box goes to which switch and cap off the one you don't want to use. 

This will leave a "dead" switch somewhere if it was, and still is, wired for independent switching. If so, you can remove the switch and replace the cover with one that has a blank where the dead switch was.