You can do this, and there’s a very rare case where you should.
Considering the worst case, which is a Yahtzee of sixes that you could score as 30 + the 35 point bonus vs a Yahtzee for 50 points, you’re netting an extra 16 points by scoring the roll as sixes.
If you take the Yahtzee score of 50, then just try to roll 6s on your next roll, you should expect to score 12 points (I just wrote a little Monte-Carlo simulation to test this).
The full probabilities are more complicated, but if you’re in a game where 12 points on sixes won’t get you the bonus, and you only have sixes and yahtzee left as boxes, and you roll five sixes, it’s probably better to take the score as sixes.
According to Wikipedia, the optimal strategy has been determined for Yahtzee and is published in http://www.amazon.com/Advantage-Yahtzee-Olaf/dp/0929712048/ref=sr_1_1?ie=UTF8&qid=1326142125&sr=8-1]Advantage Yahtzee