Solving the Wake-Up Scattering Problem Optimally