I found a closed form solution by means of the theory of differential equations:
If someone gets a direct proof by matrix calculations, I will be happy to accept it. Anyways, here is my solution:
Consider the (matrix-valued) linear ODE:
$$
\dot X = BX, \quad X(0)=I
$$
and its solution $X(t) = e^{Bt}$.
The same $X$ then solves
$$
\dot X = AX + (B-A)e^{Bt}, \quad X(0)=I,
$$
which gives $X(t) = e^{At} + \int_0^t e^{A(t-s)}(B-A)e^{Bs}~ds$.
Thus
$$
X(t) = e^{Bt} = e^{At} + \int_0^t e^{A(t-s)}(B-A)e^{Bs}~ds = e^{At} + e^{At}\int_0^t e^{-As}(B-A)e^{Bs}~ds
$$
from where finds that
$$
\int_0^t e^{-As}(B-A)e^{Bs}~ds = e^{-At}(e^{Bt}-e^{At})
$$
EDIT: I have removed an identity in the last formula that only holds for commuting matrices as @loupblanc pointed out. In general it only holds that
$$
\int_0^t e^{-As}(B-A)e^{Bs}~ds = e^{-At}(e^{Bt}-e^{At}) = e^{-At}e^{Bt}-I.
$$