As stated in the comments, the question is somewhat unclear. I see three possible interpretations:
a) My first understanding of the question was that $T$ is an automorphism on the the vector space of $2\times2$ matrices, i.e. a linear transformation from that space to itself. In that case, the answer is "no", since that space is $4$-dimensional, so we'd need $4$ values and not $2$ to fix an automorphism.
b) If we stick with taking the matrices at face value as matrices, since both $A$ and $C$ are diagonal, another interpretation is that the domain is meant to be the space of all diagonal matrices. That space is $2$-dimensional, so the $2$ given values fix a linear transformation from it. Writing
$$E_1:=\left(\begin{array}{cc}1&0\\0&0\end{array}\right)$$
and
$$E_2:=\left(\begin{array}{cc}0&0\\0&1\end{array}\right)\;,$$
we can write the given data as
$$T(2E_1+E_2)=\left(\begin{array}{cc}4&3\\0&2\end{array}\right)$$
and
$$T(8E_1+3E_2)=\left(\begin{array}{cc}1&5\\0&7\end{array}\right)\;.$$
Then linearity and Gaussian elimination yields
$$T(c_1E_1+c_2E_2)=c_1\left(\begin{array}{cc}-5.5&-2\\0&0.5\end{array}\right)+c_2\left(\begin{array}{cc}15&7\\0&1\end{array}\right)\;.$$
c) Your somewhat unclear statement "the two input matrices are bases" suggests a third interpretation: We could interpret $A$ through $D$ as matrices representing bases of the intended domain $\mathbb R^2$ of $T$. (Note that "representing bases" and "being bases" are two quite different concepts.) The column vectors of the matrices could be intended to be taken as basis vectors of a basis, or, equivalently, the matrices could be intended to be taken as transforming from the basis to the canonical basis.
In this case, there is no such linear transformation, since the facts that the basis vector $\left(2\atop0\right)$ is transformed into $\left(4\atop0\right)$ and the basis vector $\left(8\atop0\right)$ is transformed into $\left(1\atop0\right)$ are incompatible. Indeed, under this interpretation, a single condition $T(A)=B$ (with non-singular $A$) would suffice to fix an automorphism on the domain.