Optimal Control under Controlled-Loss Constraints via Reachability Approach and Compactification