This may be long but I'm including every conceivable detail.(1) To avoid the trivial case, assume $X \ne \phi$...............(2) By the standard $ \epsilon , \delta$ method we see that $T$ is continuous.................. (3) For any non-empty closed $S \subset X $, let $D(S)= \sup \{d(x,y) : x,y \in S\}$. We have $ D(S)\leq D(X)<\infty$ because any metric on a compact space is a bounded metric......................(4) For non-empty closed $S\subset X$ , if $S$ has at least $2$ members then $D(T(S))<D(S)$. PROOF : If not, let $(x_n)_n$ and $(y_n)_n$ be sequences in $S$ with $\lim_{n \to \infty}
\ d(T(x_n),T(y_n))= D(S)$.By selecting convergent subsequences of $(x_n)_n$ and $(y_n)_n$ we may suppose WLOG (without loss of generality) that $(x_n)_n$ converges to $x$ and $(y_n)_n$ converges to $y$ with $x, y \in S$ (because $S$ is closed). But by continuity of $T$, we have $0 \ne D(S)= \lim_{n \to \infty}d(T(x_n),T(y_n))=d(T(x),T(y))<d(x,y) \le D(S)$, a contradiction..........................(5)As Rob Arthan suggests, let $X_0=X$ and $X_{n+1}=T(X_n)$. The continuous image of a compact space is compact, so if $X_n$ is closed, it is compact, so $X_{n+1}=T(X_n)$ is compact, hence $X_{n+1}$ is closed.By induction every $T_n$ is closed.We also have $X_n \subset X_{n-1}$ for every positive integer $n$ by induction, for if $ X_n \subset X_{n-1}$ then $X_{n+1}=T(X_n)\subset T(X_{n-1})=X_n$ .Obviously $\phi \ne X_n$ for all $n$..........................(6) Since $X$ is compact, the set $ Y=\cap_n X_n \ne \phi$ is non-empty, and also closed................ (7) We have T(Y)=Y. PROOF : Let $y \in Y$ .For each $n$ we have $y \in X_{n+1}=T(X_n)$ so choose $x_n \in X_n$ with $T(x_n)=y$. Now as before, by choosing a subsequence of $(x_n)_n$ we may assume WLOG that $(x_n)_n$ converges to a point $x$. We have $x \in X_n $ for every $n$ because $X_n$ is closed and $(x_j)_{j \geq n}$ is a sequence in $X_n$ converging to $x$ .So $x \in \cap_n X_n =Y$, so by continuity of $T$ we have $T(x)=y$ . So we have $Y \subset T(Y)$ .On the other hand, $z \in Y \implies (\forall n (T(z) \in T(X_n)=X_{n+1}\subset X_n)) \implies (\forall n (T(z) \in X_n))\implies T(z) \in Y$ .So we have $T(Y)\subset Y.$ ......................(8) FINALLY if $Y$ had more than one member then by (4) we have $D(T(Y)<D(Y)$ which is absurd because $T(Y)=Y$.And $Y\ne \phi$ so for some $y$ we have $\{y\}=Y=T(Y)=\{T(y)\}.$ QED.