Yes, we can. Let us first prove the following
Lemma. Let $a,b, c,d \in \mathbb R$ such that $a < b$. Then there exists a smooth ($C^\infty$) function $f : \mathbb R \to \mathbb R$ such that $f = c$ on $(-\infty,a]$ and $f = d$ on $[b,\infty)$.
Proof. It suffices to construct $f$ for $a=0, b=1$ and $c = 0, d= 1$ (for the general case the function $\tau \circ f \circ \sigma$ with $\sigma(x) = \frac{x-a}{b-a}$ and $\tau(y) = c + (d-c)y $ will do). It is well-known that the function
$$g(x) = \begin{cases} 0 & x \le 0 \\ e^{-1/x} & x > 0 \end{cases} $$
is smooth. Now let
$$f(x) = \frac{g(x)}{g(x) + g(1-x)} .$$
Note that not both of $x$ and $1-x$ can be $\le 0$, thus $f$ is well-defined and smooth. Clearly $f=0$ on $(-\infty,0]$ and $f = 1$ on $[1,\infty)$.
Let us construct the desired $\phi$. Set formally $y_0 = 0$. For $n \ge 1$ let $f_n : \mathbb R \to \mathbb R$ be smooth such that $f_n = 0$ on $(-\infty,2^{n-1}]$ and $f_n = y_n - y_{n-1}$ on $[2^n,\infty)$. Now define
$$\phi = \sum_{n=1}^\infty f_n .$$
This is a well-defined smooth function because for each $x \in \mathbb R$ there exists $m$ such that $x \in (\infty,2^m)$. Thus for $n > m$ and $x' \in (\infty,2^m)$ we have $f_n(x') = 0$ and therefore on the open neighborhood $(\infty,2^m)$ of $x$ we get $\phi = \sum_{n=1}^m f_n$ which is a finite sum of smooth functions. Moreover $f_n(2^k) = 0$ for $n > k$ and therefore
$$\phi(2^k) = \sum_{n=1}^k f_n(x) = \sum_{n=1}^k (y_n - y_{n-1}) = y_k - y_0 = y_k .$$