I'm trying to provide a solution for a restaurant I frequent. They always seem to get flies inside their light fixtures. We discovered after examining the fixture that there are 3 or 4 small holes on top which gives the flies direct access to the inside of the fixture. What can be used to prevent this by filling in the holes on top next to where the hang cord is?
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.