A Space-Time Block Code (STBC) C ST is a finite collection of n t × l complex matrices. If S is a complex signal set, then C ST is said to be completely over S if all the entries of each of the codeword matrices are restricted to S. The transmit diversity gain of such a code is equal to the minimum of the ranks of the difference matrices (X − X ), for any X = X ∈ C ST , and the rate is R = log |S| |CST | l complex symbols per channel use, where |C ST | denotes the cardinality of C ST . For a STBC completely over S achieving transmit diversity gain equal to d, the rate is upper-bounded as R ≤ n t − d + 1. An STBC which achieves equality in this tradeoff is said to be optimal. A Rank-Distance (RD) code C F F is a linear code over a finite field F q , where each codeword is a n t ×l matrix over F q . RD codes have found applications as STBCs by using suitable rank-preserving maps from F p to S. In this paper, we generalize these rank-preserving maps, leading to generalized constructions of STBCs from codes over Galois ring GR(p a , k). To be precise, for any given value of d, we construct n t × l matrices over GR(p a , k) and use a rank-preserving map that yields optimal STBCs with transmit diversity gain equal to d. Galois ring includes the finite field F p k when a = 1 and the integer ring Z p a when k = 1. Our construction includes as a special case, the earlier construction by Lusina et.al. which is applicable only for RD codes over F p (p = 4s + 1) and transmit diversity gain d = n t .