There is a game map on the HOL entry for
Superfrog and it looks like you would have to time a very well judged jump, hit the roof and at that exact time start using your wings (preferably with autofire!) to make it past the spikes. The fact the game places 2 wings pickups just before that suggests to me that it's the only way to complete it.