first, and less importantly, your wheels are gyroscopes
second, and much more importantly, at speed you use your steering to compensate for imbalance. You lean a little right? slight steering to the right compensates. When standing still, steering is no longer an option (duh)
It has as the sole cause. But when you have a couple big spinny bits, there is going to be some gyroscopic effect, and it does help keep it upright. It just can't on its own, it provides a small assist.
Actually, the gyroscopic effect (specifically precession) has more to do with making the steering go the right way than keeping the bike upright directly.