In this paper, a novel two-dimensional (2D) generalized optical spatial modulation (GOSM) scheme is proposed for multiple-input multiple-output optical wireless communication (MIMO-OWC) systems. By grouping multiple successive time slots as one time block, 2D GOSM mapping can be performed not only in the space domain but also in the time domain. Specifically, two types of 2D GOSM mapping schemes are designed, including 2D-1 and 2D-2 GOSM mappings. Moreover, to address the high complexity issue of optimal joint maximum-likelihood (ML) detection and the noise amplification and error propagation issues of zero-forcing-based ML (ZF-ML) detection, a deep neural network (DNN)-aided detection scheme is further designed for 2D GOSM systems. Simulation results demonstrate the superiority of the proposed 2D GOSM scheme with deep learning-aided detection for high-speed and low-complexity MIMO-OWC systems. More specifically, a remarkable 3.4-dB signal-to-noise ratio (SNR) gain can be achieved by 2D GOSM in comparison to the conventional one-dimensional (1D) GOSM, when applying the DNN-aided detection.