Yes, it can be done. If the second Gmail account is already set up, GooglePhotos will ask you which account you wish to use. Usually, you'll find the standard account there, but also an option to use a different account. (I don't know exactly what will be displayed, it should be something like "Manage account", or "Sign in with a different account"...).
If you don't tap your standard account, but the second option, you can use the app with your second account as main account in GooglePhotos.
It's also possible to switch between accounts afterwards.
Hope that helps.