Being just 4wks into flowering you still have time to do some heavy assault on them. some pyrethrin sprays, azamax spray, or pepper oil spray. I use an insectasidal soap spray that you can buy commercially that doesn't harm the plants or fruits. It doesn't wipe them out but it keeps them under control. just don't spray any developing buds or the tops of the leaves that have direct light on them. Spray the undersides of the leaves and down low on the plants.
get a cereal size bowl of water with MG bloom booster mixed in(1tsp) and set in grow area for a couple days...and you'll see most if not all wht flies will be dead inside...something about the mix attracts wht flies and when they land to feed/drink they're stuck and die....my work with what ever bloom booster you have....good luck..try it