Is it true that $f$ must be constant?

Remove a bit of obfuscation: Let $g(x)=f(1+x)$. Then $g$ is continuous at $x=0$ and $g(x)=g(2x)$. Now it is clearer how to proceed (though you can work with $f$ itself): By induction $g(2^nx)=g(x)$ for all $n\in\Bbb Z$. Then for any $x$, $$g(x)=\lim_{n\to\infty}g(x)= \lim_{n\to\infty}g(2^{-n}x)=g(0)$$


From your assumption we have $f(x)=f(\frac{x}{2}+\frac{1}{2})$ for all $x$. For $x\in \mathbb R$ and substituting successively $x$ by $\frac{x}{2}+\frac{1}{2}$, we get $$f(x)=f\Big(\frac{x}{2}+\frac{1}{2}\Big)=f\Big(\frac{1}{2}\Big(\frac{x}{2}+\frac{1}{2}\Big)+\frac{1}{2}\Big)=f\Big(\frac{x}{2^2}+\frac{1}{2}+\frac{1}{2^2}\Big)=\cdots =f(\frac{x}{2^n}+\frac{1}{2}+\cdots \frac{1}{2^n}\Big).$$ Note that $\frac{x}{2^n}+\frac{1}{2}+\cdots +\frac{1}{2^n} \to 1$ as $n\to \infty$ with fixed $x$. Then by the continuity of $f$ at $1$ we get $f(x)=f(1)$ for all $x$.


Let $y=2x-1$, we see that $f(y)=f((y+1)/2)$ for all $y\in\mathbb{R}$.

For each $x\in\mathbb{R}$, we define a sequence $\{a_n(x)\}_{n=1}^{\infty}$ by the recursion formula $a_1(x)=x$, $a_{n+1}(x)=(a_n(x)+1)/2,n\in\mathbb{N}$. Thus $f(a_k(x))=f(x)$ for all $k\in\mathbb{N}$. Now observe that $a_{n+1}(x)-1=(a_n(x)-1)/2$, and we obtain the general term $a_{n}=1+(x-1)/2^{n-1}$, which tends to $1$ as $n\to\infty$. The result now follows by the continuity of $f$ at $x=1$, i.e. $$f(x)=\lim_{k\to\infty}f(a_k(x))=f(\lim_{k\to\infty}a_k(x))=f(1).$$