No it is not. Make a small trace and put the via there. The reason is the via can suck up the solder and make the pad dry if you are reflowing. Also, the via may be off-center if the pad is small. But if the via is small and the pad is large, and you are hand soldering you could probably get away with it. In either case, make the via as small as you can.
When you really do need a via in the middle of the pad because space is tight (like breaking out a BGA) special measure are taken that have to be specified to the board house.