yes, in fact this is one of the best ways to store a bike. the weight of the bike will not hurt the wheels.
avoid having your tires rest on a bare concrete floor (such as in a basement or garage) for long periods of time. this is because the concrete draws moisture out of the rubber of the tires, causing dry-rot and premature aging of the tires.
if you must store your bike upright with the wheels on the floor, store them on a non-concrete floor (e.g. wood or carpet), or put rugs or rubber mats under the wheels. in this case, check the tire pressure and pump them up occasionally--this 