My iPhoto library takes way too much space on my Mac Air. Can I upload it to the iCloud?
No, you can’t. In order to do this, you have to migrate from iPhoto to Photos.

Photos contains the integration with iCloud storage that can offload to your iCloud account on demand to free up local space.