Constraining Continuous Topology Optimizations to Discrete Solutions for Photonic Applications