We investigated the magnetic-field dependence of the Josephson current and Fiske resonances in specially shaped Josephson junctions. In order to be able to use junctions for high-resolution X-ray spectroscopy, a very good suppression of the sidelobes of both the Josephson current and the Fiske resonances must be achieved. In a theoretical argument we show that a properly chosen junction shape leads to the sidelobe suppression of both the critical current and Fiske resonance amplitudes. The Josephson current and Fiske resonance amplitudes were measured as a function of the magnetic field, for junctions fabricated in Nb/Al technology. As expected, a very good sidelobe suppression was obtained for quartic-shaped junctions. For junctions with anodized structures within the tunneling area, the shape of the internal structures is reflected in the field dependence of both the Josephson current and the Fiske resonances. Finally, Fiske modes in these junctions have been imaged with low-temperature scanning electron microscopy, and we conclude that a quartic junction can be approximated by a rectangle, to describe the lower-order Fiske modes, whereas the high-order modes are specific to the exact shape of the junction.