Walking barefoot probably won't be as bad as you expect.
For one thing, that trail is walked barefoot by a lot of people, all the time. A lot of the things that make barefoot walking painful are likely to be accounted for - the will brush the path for small stones or sharp bits that would hurt to step on. For walking on the road, it might be wisest to stay close to the middle, since that part will be cleanest (I mean from pebbles and painful-to-step-on things). It should be pretty smooth. When I have been to India, it's pretty typical to find places where people are expected to be barefoot to be pretty careful about how foot-friendly the floors are, even if most people have tougher feet.
The texture might be a little rougher than you're used to, but since it is meant for people to walk barefoot on, they will probably have paid more attention to texture than roads or tile walkways where people are expected to wear shoes. If everyone is welcome, they may have taken extra care for people not much used to walking barefoot. I think it won't be too much different from walking barefoot on inside floors, except for the longer distance. If you're worried about direct heat from sun-warmed floor, it usually isn't bad if you're walking since your foot keeps moving - just watch where you stand while resting. Places that have smooth, worn stone are often more comfortable for walking on then earth or grass (the different textures can feel rough or conceal pokey little bits).
I can't say how offended anyone will be if you wear shoes, that will depend on how flexible they're willing to be. If the path is open to everyone, and they get a lot of tourists, they may be resigned to it (though they will still prefer not). Taking off shoes has to do with cleanliness, not tracking dirt in from outside - although for something like this it's much more symbolic than literal. If you are thinking about having a backup, having an obviously new, clean pair might help (sort of like inside vs outside shoes), and be more respectful - although that will only matter to those who know that's what you are doing. I would recommend you try barefoot, and only pull out shoes if you really can't, but it is between their tolerance and your choice.
Alternately, you might consider socks for your backup... the act of taking your shoes off is the relevant part, so for some reason I think that socks might give a little protection without offense. You can take off your shoes, and wander around in socked feet while still being 'shoe-less'. I have seen it in some places (including temples), but again the tolerance of the people there will be the deciding factor. For myself, I think walking in socks is more annoying than barefoot, but a thick pair might cushion your feet if you're having problems. I would suggest you carry them, and only put them on if needed, though. Also, they will get dirty, and can't be washed as easily as feet, so you might want to think about that, and the wear and tear vs the quality of your socks, and how thick they are in terms of heat as well as protection.
Beyond that, take all precautions due to the walk itself - make sure you're up for the long walk (or be prepared to stop or leave if you aren't), take breaks if you need them, have enough good drinking water (don't get dehydrated), have anything you might need for the time or length of walk, snacks or a hat or whatever (or know what will be available nearby). Walking barefoot is only part of the experience - part will just be walking the distance.
Also, walking barefoot more (as others suggested) might help toughen up your feet a little - but I would actually suggest walking in sandals would be a lot more helpful in preparation. The way your foot moves and flexes when walking in sandals is different from walking shoes - it is more similar to walking barefoot, the sandal protects the bottom of your foot from pebbles on the ground and adds a little cushioning, but that is mostly all. It will help you figure out how the lack of extra support from your shoe will effect you walking over longer distances - especially if you pick up the cheap flat sandals, instead of the extra cushioned support ones. And it will be easier than needing to actually find distances that are barefoot friendly.
Has anyone tried walking such a long distance barefoot on stone?
Yes the pilgrims do!