Homework is essential in improving education for students, regardless of academic level. Numerous studies have shown that homework reinforces concepts learned in the classroom, and making outside work optional would only work to limit the academic interests of students.
If a student already understands a concept, the student should not be forced to do homework on it. Teachers could instead have a system where students who do homework receive "buffer points" so that if they miss points on a test, the homework covers it.
This requires that such "buffer points" be specific to a single topic in class. Otherwise, one could perform homework on a well-understood topic and then use the points as an excuse not to learn another, thus leading to less learning.