Abso-fucking-loutely. But be careful.
If the game you make gets any kind of attention beyond utter unknown obscurity, the big N will hunt you down and make you suffer for daring to mess with their precious IP.
I recommend one of two approaches. Either...
1 - Stay totally off the radar while you're developing it. Post no updates, screenshots... Nothing. Then, when it's done, release it anonymously under a pseudonym from behind a VPN. Nintendo can try and pull it down, but it won't be connected to you and once it's online it can't really be killed.
Or...
2 - Take the Chinese knockoff approach and make it not-Mario. Change around names, colors, appearances, settings, just enough to avoid copyright infringement. The more you change, the safer you are. If done right it will still be recognizably Mario while not being Mario enough to trigger Nintendo's lawyers.