Sheldon has a chart that shows what width of tire fits on what rim based on the width of the rim. He also notes that people often exceed the recommended widths with no adverse effects. He also notes the possible problems with straying too far outside the recommended widths.
It's also worth noting that tire width measurements aren't well standardized. Much like shoe and clothing sizes, some manufacturers' sizes may run a bit large or a bit small. They're really more like guesstimates.
This is due to a couple of factors. Manufacturers are under market pressure to produce the lightest components possible. If they can shave off a few grams by calling a 24mm tire 23mm, they just might do that. There's also the fact that the rim width effects the overall inflated width of the tire. If one manufacturer is building a tire with the intent that it's mounted on 17mm rim and another builds the exact same tire but bases it on a 21mm rim, the resulting measurement will be different.
Two millimeters over the recommended maximum is probably still going to be just fine.