+1 on the check before buying. I now have an xtr 36t spare for this reason as the bike only took a 34 (officially 32!!).
that said, I believe the Shimano chainrings are the same for XT and XTR. The bolt only keeps it against the crank arm, the spider/nuts is what touches the holes and the bolts come with the crankset anyway so must be correct in terms of diameter. The thickness of the ring is identical so length of bolt won’t matter. The 34/36 come with spacers (washers to you and I) but the standard bolts fit fine for these and the 32t.
si.shimano.com doesn’t seem to confirm any of this so please don’t take my word for it as I have no proof. If you’re near Reading I can offer a test of a 36t XTR ring though…