The paper http://matwbn.icm.edu.pl/ksiazki/fm/fm60/fm60123.pdf contains an example of a compact continuum with the property the only continuous mappings from $X$ to $X$ are the identity mappings and the constant mappings. See also the answer Strongly rigid Hausdorff spaces.

However, any compact Hausdorff space $X$ where the only maps $f:X\rightarrow X$ with fixed points are the constant and identity functions must be totally path-disconnected as well as connected: If $X$ is not totally path-disconnected, then there is a path $f:[0,1]\rightarrow X$ with $f(0)\neq f(1)$. However, in this case, there is a homeomorphism $g:C\rightarrow I$ where $C\subseteq X$ is a closed subspace. By Tietze's extension theorem, there is some $h:X\rightarrow I$ that extends $g$, but $g^{-1}\circ h:X\rightarrow X$ is a mapping with $g^{-1}\circ h[X]=C$, so $g^{-1}\circ h$ is not a constant mapping nor the identity mapping, but clearly $g^{-1}\circ h$ is the identity on $C$, so $g^{-1}\circ h $ has plenty of fixed points.