Optimization of a general-purpose, actively scanned proton beamline for ocular treatments: Geant4 simulations