Low-pass filter LC for PWM
What you need is a filter in the time domain. Since that is used to drive a motor, you're interested in a fast transient response, since it looks like you're in open loop. As Rohat Kılıç mentions, the lower the corner frequency, the better, but because of the fast response requirement you can't go too low. The quality factor should be, ideally, critically damped. You could also get a Bessel (slightly underdamped), or Gaussian (same), but going for Butterworth and above (even transitional) will mean overshoot. The downside will be that Bessel or lower filters will not attenuate higher frequencies as well as the others. As for the frequency, you'll have to decide on how fast you want the response time to be, and the amount of filtering.
Going for the critically damped solution, you will have the normalized transfer function, \$H(s)\$ and the desired t.f., \$G(s)\$:
$$\begin{align}
H(s)&amp;=\dfrac{1}{s^2+2s+1}\tag{1} \\
G(s)&amp;=\dfrac{\dfrac{1}{LC}}{s^2+\dfrac{1}{RC}s+\dfrac{1}{LC}}\tag{2}
\end{align}$$
Where R is the load and, since you say it's a 24 V and 50 W, then it's a 11.52 Ω. With this, we get a system of equations from which L and C can be calculated:
$$\left\{\begin{aligned}
\dfrac{1}{11.52C}&amp;=2 \\
\dfrac{1}{LC}&amp;=1 
\end{aligned}\right.$$
$$ \Rightarrow L=23.04,\;C=0.0434 \tag{3}$$
For the corner frequency let's choose the geometric mean between the switching frequency and DC, which means \$f_c=\sqrt{200000}\approx 14.14\;\mathrm{kHz}\$. Let's consider \$f_c=10\;\mathrm{kHz}\$, which means:
$$L=\dfrac{23.04}{2\pi f_c}=367\,\mu\mathrm{H}\;,\qquad C=\dfrac{0.0434}{2\pi f_c}=690\;\mathrm{nF}\tag{4}$$
To test the effect of various corner frequencies has on the response time and the amount of DC filtering, run a simulation:

Don't mind the input source, it's just some random PWM of 200 kHz, the results will be scaled with the input. Given the values previously calculated, the tests start with half those values (black trace), and end up with 3 times those values (pink trace). The red trace is the one with no multiplier. As you can see, the compromise is between a fast response time but not so great filtering, and a slow response time but better filtering.
But there is a problem. One additional factor include the load, which is calculated for the maximum power, but since you will have a PWM driving it, that means the load will be less and less as the duty cycle gets lower. Its value may get several times 11.52 Ω. If the load is 50 Ω, for example, here is how the response will look like:

This is the danger of having an LC filter in open loop. Adding one will not necessarilly cure it, because the loop will add its own baggage of problems, but this is to let you know that an LC filter is passive, which means once calculated they stay that way. And that's not all: a motor is an inductive load, and that will add a very unwanted zero, which means the system will oscillate. Here is a quick test with a very basic motor model:

Notice that k=100, that means the filter is now at 100 Hz (see the time scale) in order to dominate the zero of the motor -- the pole must be much lower in frequency, otherwise the oscillations would have been much worse. Of course, this is just a crude, basic motor model, and I have no idea what values would be fine for this case, but it gives you a hint of what could be. This is why, in such cases, a controlling loop is usually added. It will add complexity, it won't make the response perfect, but it will help a lot. Therefore nobody says you can't use one, just that if you do you may have different results than expected.