Receiver complexity is an important performance metric in space time block coding (STBC). After comprehensive study and analysis of STBCs over complex domain, quaternion orthogonal designs (QODs) have been explored that can provide less decoder complexity. However, some researchers argue that existing maximum likelihood (ML) decoding rule for QODs does not yield optimal performance for quasi-orthogonal STBC-based QODs and, therefore, the design of optimal decoder for such designs remains a big challenge of this field. To counter this observation, we modify the system model slightly. In addition to this, we present a new generalized QOD construction that can generate QODs for any number of transmit antennas. These codes are quasi-orthogonal in complex domain and provide code rates higher than their respective complex orthogonal designs (CODs). We show that the proposed ML decoder provides optimal linear decoupled decoding solution for these codes because of their distinctive construction. Simulation results verify the optimal performance of the ML decoder for the proposed codes and also show that the diversity of the proposed quaternion-based codes is same as CODs, however, they provide better code rates.