Yes.
You've got 3 options:
A 49-way joystick controlled by a GP-Wiz49 can be electronically restricted to 4 & 8-way, plus 4-way diagonal. Also 2-way vertical, 2-way horizontal, and 2 49-way modes. Electronic restriction means that the joystick will only send (in the case of 4-way mode) up, down, right, and left- but will not send a diagonal. Electronic restriction will NOT physically keep the joystick from being pushed in those directions, it just won't send that data to the computer.
Options 2 and 3 are the T-Stick+ or the OmniStik Prodigy. Both can be switched from 4-way to 8-way operation, and these are physically restricted- eg, the stick CAN'T be moved into the diagonals when in 4-way mode. For Q-Bert and Congo Bongo, use these sticks in 8-way mode, and map the MAME inputs to read the diagonals and to IGNORE the cardinal directions, and the game plays and feels like it ought.