Hmmm. How desperate are you? If you just got hit by a freak blizzard in the middle of July, and are buried under 10 feet of snow; then go for it.
But seriously, hamsters and guinea pigs have different dietary needs. If it's just for a day, while you need to go to the store, I guess it's better than him starving. But if you're thinking of this as a permanent solution, than I would have to say no. Others could probably answer this better than me...