The Hydrogen Intensity and Real-time Analysis eXperiment (HIRAX) is a planned interferometric radio telescope array that will ultimately consist of 1024 close packed 6 m dishes that will be deployed at the SKA South Africa site. HIRAX will survey the majority of the southern sky to measure baryon acoustic oscillations (BAO) using the 21 cm hyperfine transition of neutral hydrogen. It will operate between 400-800 MHz with 391 kHz resolution, corresponding to a redshift range of 0:8 < z < 2:5 and a minimum Δz/z of ~0.003 (frequency resolution 500 < R < 1000). One of the primary science goals of HIRAX is to constrain the dark energy equation of state by measuring the BAO scale as a function of redshift over a cosmologically significant range. Achieving this goal places stringent requirements on the mechanical and optical design of the HIRAX instrument which are described in this paper. This includes the simulations used to optimize the mechanical and electromagnetic characteristics of the instrument, including the dish focal ratio, receiver support mechanism, and instrument cabling. As a result of these simulations, the dish focal ratio has been reduced to 0.23 to reduce inter-dish crosstalk, the feed support mechanism has been redesigned as a wide (35 cm diam.) central column, and the feed design has been modified to allow the cabling for the receiver to pass directly along the symmetry axis of the feed and dish in order to eliminate beam asymmetries and reduce sidelobe amplitudes. The beams from these full-instrument simulations are also used in an astrophysical m-mode analysis pipeline which is used to evaluate cosmological constraints and determine potential systematic contamination due to physical non-redundancies of the array elements. This end-to-end simulation pipeline was used to inform the dish manufacturing and assembly specifications which will guide the production and construction of the first-stage HIRAX 256-element array.