Most likely these are a kind of fungus gnat, living in and eating organic matter. the will do no harm to your figus tree. Allow the soil to dry out between waterings and be sure to empty the water saucer too. Treating tropical can be difficult as they react differently than an outdoor shrub would. Read any label very carefully.