TL;DR: The answer is yes IF the functions $f_n$ below can be shown to converge pointwise to the function $f$ below.
First, we want to show that we can express all continuous functions on the real line in this way. If you're okay with using piecewise linear functions, then you can skip this part.
Let $f$ be continuous on $\mathbb{R}$. Then for every $n \in \mathbb{N}$, the Weierstrass Approximation theorem tells us that there is a polynomial $p_n$ such that:
$$
\sup \limits_{x \in [-n,n]} |f(x)-p_n(x)| < \frac{1}{n}
$$
In particular, we have that the sequence $(p_n)_n$ converges pointwise to $f$ on $\mathbb{R}$. Indeed, if we take some $x \in \mathbb{R}$, we can find some $N \in \mathbb{N}$ such that $x \in [-N,N]$. Then for every $n \geq N$, we have $|f(x) - p_n(x)| < \frac{1}{n}$, so we get the convergence.
Hence we can express any continuous function as the pointwise limit of a sequence of polynomials, which are expressed using only exponentiation, multiplication, and addition.
Now, we want to use continuous functions to approximate pointwise the following function:
$$
f(x) = \left\{
\begin{matrix}
x^2 && \text{if } x \in \mathbb{Q} \\
0 && \text{if } x \notin \mathbb{Q}
\end{matrix}
\right.
$$
To do so, take an enumeration $(q_n)_n$ of the non-zero rationals (this can be done with a closed form expression). Define the functions $g$ and $g_n$ in the following way:
$$
g(x) = \left\{
\begin{matrix}
1+x && \text{if } -1 \leq x \leq 0 \\
1-x && \text{if } 0 \leq x \leq 1 \\
0 && \text{otherwise}
\end{matrix}
\right.
$$
Note that $g$ is a spike of height 1, centered at $x=0$, and of "radius" 1.
$$
g_n(x) = (q_n)^2 * g\left( \frac{x-q_n}{(q_n)^2} \right)
$$
Then $g_n$ is a spike of height $(q_n)^2$, centered at $q_n$, and of "radius" 1.
Finally, define $f_n$ as:
$$
f_n(x) = \sum \limits_{k=1}^n g_k \left(\frac{x}{10n^3}\right)
$$
So, $f_n$ has spikes at the first $n$ rationals, of height $(q_n)^2$, and of rapidly shrinking "radius". I'm not entirely sure, but I think this should converge to the function $f$ described above. Given that the sequence of rationals is given in closed form, and all the other functions are simple operations in terms of the piecewise linear (and continuous) function $g$, this attains the goal.
Of course, the pointwise convergence of $f_n$ to $f$ has to be checked, but it's late here.