Let us temporarily remove the binary constraint and solve the problem without that. Then, we shall see if we can achieve the same value under the binary constraint.
Fix $T>0$, $c \in \mathbb{R}$, and let $f(x)$ and $v(x)$ be given differentiable functions of $x \in \mathbb{R}$. For $t \in \mathbb{R}$ define:
$$ H(t) = \int_0^t e^{-f(x)}(v(x)-c)dx $$
Let $A(t)$ be a given differentiable function of $t \in \mathbb{R}$. Suppose that $A(t)$ is nondecreasing and has $A'(t) \in [0,1]$ for all $t$. So $A(t)$ increases by at most $T$ over any interval of duration $T$. Then the objective function value for this given $A(t)$ is:
\begin{align}
val &= \int_0^T A'(t) e^{-f(A(t))}(v(A(t))-c)dt \\
&= \int_0^T \frac{d}{dt}[H(A(t))]dt\\
&= H(A(T))-H(A(0)) \\
&\leq \sup_{z \in [0,T]} [H(A(0)+z)-H(A(0))]\\
&\leq \sup_{a \in \mathbb{R}, z \in [0,T]} [H(a+z)-H(a)]
\end{align}
Suppose the supremum is finite and is achieved at particular values $a^* \in \mathbb{R}, z^* \in [0,T]$. Then the optimal value is:
$$ val^* = H(a^*+z^*) - H(a^*) $$
and we can achieve this value using the function $A(t) = a^* + (z^*/T)t$. So linear functions are optimal for this problem. Of course, the objective value only depends on the $A(t)$ function at its endpoints, so many other kinds of functions are also optimal.
We can also achieve $val^*$ using binary control: Define:
$$ u(t) = \left\{ \begin{array}{ll}
0 &\mbox{ if $t <T-z^*$} \\
1 & \mbox{ if $t \geq T-z^*$}
\end{array}
\right.$$
Define $A(t) = a^* + \int_0^t u(\tau)d\tau$. Then $A(T-z^*)=a^*$ and $A(T)=a^*+z^*$. We get:
\begin{align}
val &= \int_0^T u(t)e^{-f(A(t))}(v(A(t))-c)dt \\
&= \int_0^{T-z^*} u(t)e^{-f(A(t))}(v(A(t))-c)dt + \int_{T-z^*}^Tu(t)e^{-f(A(t))}(v(A(t))-c)dt \\
&= \int_{T-z^*}^T A'(t) e^{-f(A(t))}(v(A(t))-c)dt\\
&=H(A(T))-H(A(T-z^*))\\
&=H(a^*+z^*)-H(a^*)\\
&=val^*
\end{align}