Your problem is pretty common. The drosophila or fruit flies, as they are commonly known, often appears when you have open fruit bowls or if you have green plants and flowers standing around in your kitchen and home. Especially over ripe fruit and flowers left standing in vases for a longer period of time seem to attract them. See to it that you keep the fruit fully covered and if you have plants, try spraying them with safe insecticide.
Also, check out the link given below. It has lots of tips on how to get rid of them.
Good Luck:)
L, Kamla
http://www.howtogetridofstuff.com/pe...f-fruit-flies/