Currently, the only ways to enroll learners in a course or program and set it as "optional" for the learner to complete are:
1. Adding a group
2. Having the learner self-enroll by sending them the link
Whether you add the learner by clicking the +Learner button or uploading them via CSV, the option to set the course as required, recommended, or optional should be available.