Yes, as long as you have at least one firewall running for protection while you are connected to the internet.
Yep, as long as you are not explicitely surfing the internet, downloading stuff etc... you can perfectly switch off your anti-virus while you play, it will save a lot of ressources. But:
- never, NEVER turn off the firewall, unless you are physically disconnected from any network
- turn your AV on again after you have finished playing.