The answer to this question is yes, L can be a composite knot.
Here is an outline of how to achieve such an epimorphism:
If a knot complement $S^3-K$ is periodic, i.e. there is symmetry $\tau$ of the knot in that fixes points in $S^3$, then the knot complement covers a knot complement in an orbifold $Q$ where the base space of $Q$ is $S^3$. In this case, $Q-K' \cong S^3-K/\langle \tau \rangle$ and the base space of $Q-K'$ is some knot complement. To agree with the notation of your question, let's say this base space is $S^3-L$.
Meridians of $\pi_1(S^3-K)$ map to $\pi_1(S^3-L)$ and the covering then base space operation is a degree 1 map, so there is an epimorphism $f:\pi_1(S^3-K) \rightarrow \pi_1(S^3-L)$.
In order, to construct $Q-K'$, we can take a two component link $K'\cup C$ where $K'$ is a composite knot and $C$ is some unknotted component with non-zero linking number $\ell$ with $K'$ and $S^3-(K' \cup C)$ is hyperbolic.
Since $S^3-(K' \cup C)$ is hyperbolic, there are infinitely many $(n,0)$ fillings on $C$ that are hyperbolic with $n$ and $\ell$ relatively prime. The last condition assures that $S^3-(K' \cup C) (n,0)$ is covered by a knot complement and choosing $n$ to be sufficiently large assures there is an $S^3-K$ that covers $S^3-(K' \cup C) (n,0)$ is hyperbolic and hence $K$ is prime. However, $S^3-K'$ could be composite as in the example.
(I used snappy to give evidence of hyperbolicity for this example. Strictly speaking this is not a proof of primeness. However, (4,0) surgery seems to make this example hyperbolic, i.e. the filling has 'solution type all positively oriented tetrahedra'.)