I'm confused, what are you using the dog poop for? Get rid of the dog pie and more then likely the flies will follow. I'm not sure if the flies will harm the plants, but flies are dirty. I wouldn't want flies landing on my plants when they just got done Chillin on a pile of poo poo, unless your looking to grow some stink weed!