This paper investigates the uplink spectral efficiency (SE) characterization and energy efficiency (EE) optimization of device-to-device (D2D) communications underlying a multi-cell massive multiple-input single-output (m-MISO) network, assuming that the channels are modeled with Rician fading. First, an analytical expression for the lower-bound of the ergodic capacity of a typical cellular user (CU) is derived with imperfect channel state information in the presence of D2D links’ interference. Then, a closed-form approximate achievable SE expression for a typical D2D pair is derived considering Rician fading between D2D pairs. The asymptotic SE behavior is analyzed in strong line-of-sight (LOS) conditions for CU and D2D pairs. Also, simplified expressions are obtained for the special case of Rayleigh fading. Next, to optimize the total EE, a transmit data power allocation based on the derived rate expressions is formulated. Since the optimization problem has a non-linear and non-convex objective function, it is intractable to be solved straightforwardly. Therefore, we resort to utilizing an iterative algorithm relying on fractional programming. The numerical results show that a stronger LOS component (i.e., larger Rician K-factor) between a typical CU and its serving BS leads to a significant improvement in the system performance, while it has less effect on the D2D network.