It wouldn't work ver well since they usually don't seal 100%, and cleaning pumps usually takes a while (for a good vinegar soak that is). It would work with a gate valve, but you'd have a puddle to clean up every time you took the pump offline for cleaning.
You could probably do something along the lines of having an extra union half, elbow and short section of pipe - so that you could close the gate valve, remove the pump, then attach the extra union half/elbow/pipe with the pipe pointed straight up preventing a puddle from dripping out while you clean the pipe.
On the other hand, unless you have a pump that has built in unions you are going to have to use a gate valve AND a union, at which point it will take up just as much linear space as a true union ball valve (ball valve with unions built into one or both ends). If that's the case, then just use the true union ball valve and be done with it.