Mavericks and Yosemite on macbook pro
Yes. You need to partition the drive into two volumes, and install Yosemite on the second partition. 

You can, in theory, multi-boot your machine with any compatible OS until you run out of storage space. I have in the past had one machine boot with OS9, 10.3 and 10.5. You can also run two copies of the same version.

However, you will run into fairly serious synchronization issues if you want to run cloud services. You will not be able to revert to Mavericks after using any service with Yosemite.