AW: Wild fruit flies
Yes, if they didn't get in contact with insecticides or pesticides, wild fruit flies are safe. At least I don't know any reason why they should not be safe.
When my salamanders were small, I fed them quite often fruit flies from our compost heap.