Freeze drying is supposed to be an excellent way to retain nutrients. So is dehydration, and here's a line of dehydrated fruits and veggies that can be found at many natural foods grocery stores:
Just Tomatoes, Etc.!
As far as I know, fruit flies aren't interested in dry food. I don't have any problems with them, but they're not as common here in the desert as they are in moister climates.