So, you think Muhammad would be fine with that? No!!!
So, regardless of what he once was, that is not respectful even if that was not your intent. If you're going to use his former name, then be respectful and say formerly.
Muhammad meant so much to so many especially African Americans...