Have 14 inch rough in, can I install Toto Drake and just leave a gap in the back?

I am a novice and would like to thank all of you who contribute to the
forums. Lots of great information and advice here.

Remodeling an old bathroom, toilet has a 14 inch rough in, and because the room is small, only a round bowl will fit. I have no experience in changing
toilets and am trying to educate myself. Is there any reason why we can't
install a Toto Drake, round bowl, 12 inch rough and just leave a 2 inch
gap between the wall and the tank? We were planning to put a small
shelf above the tank and the gap wouldn't be obvious. Thanks in advance
for your advice.

As long as the toilet will fit over the opening in the floor and you are happy with the way it looks, you can install a toilet with as much space behind it as you want. I have had customers want 6" behind the toilet so they could put a shelf unit above it.

Or you could get something like the Toto Vespin or Carlyle with the 14" unifit adapter...even the elongated bowl would use less room than a standard one with 2" behind it.

Toto Vespin II CST474CEFG with SS114 Softclose seat.
This bowl was installed on a 13-1/2" rough-in using the 14" Unifit adapter.
The water shutoff can be as close as 5-1/2" to the left of center, unless it's higher off the floor, and then it can be even closer to center.
This shutoff had been replaced with a new 1/4 turn valve with brass nipple through the wall.
Installation was by James Love of Love Plumbing & Remodel 206-949-5683
In some of the older Seattle homes, the old toilets had been wall mounted tank toilets.
Those typically are 14" rough-in and need a flange repair to use standard closet bolt connections at the flange.
Everything is on the truck for that.
The Vespin comes with a standard 12" adapter or you can order a 10" or 14" adapter depending on your rough-in distance.