Talstar P Professional Insecticide is toxic to beneficial insects as well. The manufacturer recommends to apply when bees are not pollinating.
Talstar P Professional Insecticide will kill any flies that come in contact with a treated surface, but it is not what we recommend for drain flies. We would recommend our Drain Fly Kit, it contains all the products you should need to successfully treat your drain fly problem, and it includes products that are safe for use inside household drains. We would also recommend taking a look at our guide on How to Get Rid of Drain Flies.
A good treatment of Talstar should help do the trick. However, if the junipers are really thick, then you need to apply quite a bit for the product to get down to the ground where the bees are nesting.
http://www.domyownpestcontrol.com/talstar-talstar-one-p-97.html