As far as I have read the only substance that does not cause fruit flies is beetle jelly. Although, when I was keeping my male and female Dynastes Tityus I did give them a mixture of natural maple syurup and also scooped some "bleeding trees" of their sap and put it on a damp napkin and they seemed to have loved it. It can produce flies over time, but seems to have been a lot better than just fruits.