You can. It's called a https://en.wikipedia.org/wiki/Controlled_payment_number
I use it all the time. I use one with every single online merchant except Amazon and Newegg. It's also great for places that like to auto-bill. Or if you are worried they will charge without permission.
If you are going to get a credit card, get it with one of the few banks that offer these numbers.
It's also great for asking someone to buy something for you: Create a number with a dollar limit and have them tell the merchant the number. Small merchants usually have no problem with this.