Do you have the plastic cap on your airlock? Back in the day before I had a ferment fridge, I had plenty of fruit flies in my airlock after I decided (wrongly) that I didn't need that lid. The holes are tiny enough that it's hard for them to get through, and almost impossible for them to fight the escaping co2 to get down into the beer. Your picture looks like the larvae, not the adult flies, so one of them got in there to lay eggs. Refill the airlock with vodka or starsan and that should take care of that problem.