If an algebra A satisfies the polynomial identity [x(1), y(1)][x(2), y(2)] ... [x(2)m, y(2)m] = 0 (for short, A is D(2)m), then A is trivially Lie solvable of index m + 1 (for short, A is Ls(m+1)). We prove that the converse holds for subalgebras of the upper triangular matrix algebra U-n(R), R any commutative ring, and n >= 1. We also prove that if a ring S is D-2 (respectively, Ls(2)), then the subring U-m(star) (S) of U-m(S) comprising the upper triangular mxm matrices with constant main diagonal, is D-2[log2 m] (respectively, Ls([log2 m] + 1)) for all m >= 2. We also study two related questions, namely whether, for a field F, an Ls(2) subalgebra of M-n(F), for some n, with (F-)dimension larger than the maximum dimension 2 + [3n(2)/8] of a D-2 subalgebra of M-n(F), exists, and whether a D-2 subalgebra of U-n(F) with (the mentioned) maximum dimension, other than the typical D-2 subalgebras of U-n(F) with maximum dimension, which were described by Domokos and refined by van Wyk and Ziembowski, exists. Partial results with regard to these two questions are obtained.