I'd encourage everyone who thinks it was a goaltend to check out SamuelAdams' link from the rulebook - I was dead wrong about what the criteria are and it sounds like a lot of people here are too.
I see what you mean from that link, but they have conflicting information. From the rules:
Once the ball is on or directly above the rim, a defender can not touch the ball. If the ball is rolling on top of the rim, a defender can not touch the ball or the rim. If an offensive player touches the ball in any of the above circumstances, basket interference shall be riled and no points can be scored
I agree this sounds ambiguous, but the next sentence after your quote is "Once the ball rolls to the outside of the rim, the shot is over and anyone can touch the ball." So the "above the rim" part only applies to the shot, which is deemed over once the ball is moving off the rim with no chance to score.
On Shaq's shot, the ball was still partly over the rim, but it wasn't rolling on the rim, and was clearly on the outside of it with no chance to score. So the shot was over and a tap is legal. The video example with Diop is pretty similar - the ball's still partly over the rim but no longer has a chance to go in.
I hate to defend a play that cost us, but it seems consistent with the rules. I think the refs screwed up a few calls last night but that wasn't one of them.