Otherwise, pretty much any standard chemical insecticide can be effective, other than those which are purely systemic. Pyrethroids (ex: permethrin) tend to be among the safest around people, but are far from the only options.
For fungus gnat control, contact insecticides will kill adult fungus gnats, but you also need to drench the potting media or at least heavily spray the top of the potting mix thoroughly in order to kill the larvae. You should repeat this treatment at least 3 times, with treatments that are 7 - 10 days apart. You also need to spray all plants in your growing area/house/greenhouse/etc, leave no stone unturned.