My Macbook Pro (Retina, 13-inch, Late 2013) came preinstalled with Mavericks. Can I have Yosemite safely installed next to it on the same machine? If so, how?
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.