If you delete an iOS device backup file from your Mac, the photos from your Photos Library on your Mac will not be deleted.The device backups are stored separately.
But before you delete the backup, check, if your photos are really still on your Mac. You wrote "After I did that backup I deleted a lot of my pictures on my phone so they won't take a lot of space, therefore they are only on my Mac. I am afraid to loose all of them if I delete that 57GB backup."
The biggest risk of losing photos is deleting photos from a device that is syncing with iCloud Photos Library. If your Mac and iPhone should be both synching with iCloud Photos, any photo you delete from your iPhone will be deleted from iCloud and all other synced devices as well. So make sure, that you are still having your photos on your Mac, before you delete theist backup that may contain your photos. Sometime we do not notice, if iCloud Photos is enabled and are being taken by surprise, when photos vanish anywhere. After a system upgrade iCloud could become enabled by default.