It's lawful. Whether or not it's advisable is another question. If you wind up shooting someone, each and every modification you made to the pistol will likely become an issue in court. Think about how you and your attorney would respond to that. In my opinion, any modification that enhances the safety or accuracy of the weapon shouldn't be a problem for you.
But that's just *my* opinion.