Three approaches.
Approach One: slow and steady.
Unleash your creation over the course of 100 million years. That will give the ecosystems enough time to adapt. After all, the best things in life are worth waiting for.
Approach Two: apologetically.
Kill off the flies in small area, and observe what ecosystems change. Say you're sorry to any birds or frogs you kill. Use your mad scientist skills to invent something which resolves those changes so it doesn't happen again. Then go to another small area and repeat. Remember to say you're sorry if you mess it up. Eventually you find that you can kill small areas off without any trouble. Now pick a larger area and repeat. If you mess up one of the larger areas, make sure everyone knows you're really sorry. Eventually you will develop an effective fly substitute (less calories, but tastes great!) which you can unleash alongside your creation.
Approach Three: *#&!@ it all
You don't want to unleash your fly killer without disrupting an ecosystem. Nuke the ecosystem from orbit. No ecosystem was destroyed by the removal of an important food source in this process. They were removed by fusion and/or fission! It's science, peoples!
Then, once there are no more frogs or bats or birds to disrupt with your fly killer, feel free to unleash your creation without there being an ecosystem to disrupt (though it may not find many remaining flies to kill).
After all, why be a mad scientist if you can't abuse a few measly loopholes!