It wasn't hugely premeditated, but it was calculated. I do believe he was watching how much ammo Otis had left, and planned the strike for the instant when Otis would not be able to shoot back.
Also, when he goes and risks himself on these missions for the sake of others, a big part of his motivation is also trying to prove himself, trying to gain the favor of others by showing how strong and indispensable he is. He has a powerful NEED to be competent, to get things done, to control his surroundings. Not to say he doesn't care about Rick or Carl, but there's a selfish slant to even his more altruistic motives. He gets very angry when other people don't afford him the respect he feels he's earned with his previous accomplishments-- note when he was bringing up to Lori how many times he's saved her life, and so on. Which is true, but the possessive sense of entitlement there is dangerously strong.
Actually, thinking on it, if Rick wasn't there Shane would probably never have descended to this level of madness. It's the sense of inadequacy, and not being in top dog in charge that's pushing him over the edge. He might not be an ideal leader on his own, but he wouldn't be quite so batshit. Rick is just a little too oblivious to the damage this imbalance is causing-- it's not his fault exactly, but he thinks of his friend too highly and it's giving him a blind spot there while Shane boils over.
I say give him Andrea and let them do their own thing, but it's probably too late for him to be satisfied with that. He's going to take any rejection by the group very, very hard-- partly because he feels entitled, partly because he's terribly lonely and frightened.