Preferably use a SPAS12, pick up the flag AFTER you've cleared all nearby enemies. Make sure you have the SPAS equiped before picking up the flag. Run on the paths that enemies normally do not take (Running through the halls with all the windows and taking the connecting bridge on Pentagon or head out the back exit of the middle builing of Serenity, you can jump out the window as well.
When an enemy is closing the gap between you, run around the closest corner and press the shoot button to drop the flag. The SPAS comes in handy here, get in a good position to take out the enemy when they come around the corner and proceed to capture the flag.