It is quite not clear from the picture what these flies (fruit flies?) are but could be ones attracted by the flower and are trying to pollinate it. If they don't do any damage I would leave them alone and possibly wipe the droppings with a wet tissue.
watch closely, if they manage to pollinate the phal then flowers would drop. I would not want that for a Phal hybrid and if there is any chance of this pollination, I would possibly move the phal indoors.