If they outside in time they will just go away-or move to where the compost now is-they are not in your soil.
Use a fly spray in the home the dog will be fine-or get one of those stand up units for controlling flies, mosquitos and the like-again harmless to pets