There's definitely a legal way to do it. You just tie federal dollars that flow down to local police to requirements for police training. It's the same way federal highway dollars are tied to standards for state driver's licenses.
Of course states and cities will be free to turn down the dollars if they want, but the incentives will be strong for them to comply.