What can be used to fill holes on top of a lamp fixture?
You have to be careful here, because it's possible that those holes are there for ventilation, as John said.

So instead of trying to seal them completely, the absolute most you should do is cover them with some kind of mesh which will have holes small enough to keep out the flies but large enough to allow air flow.

A metal screen mesh - the kind used in making window screens - would be my choice for this.  



http://www.homedepot.com/p/Phifer-36-in-x-100-ft-Brite-Aluminum-Screen-3000031/100614699
^^ one possible source

I recommend against vinyl or fabric which might add an insulating value that you should avoid.  

To install, cut the mesh down so that it will cover each hole with a bit of an overlap and use a very thin bead of glue all the way around each hole to ensure that the screen is sealed over the hole.