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
we can write the given data as
Then linearity and Gaussian elimination yields
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.