Non-deterministic Turing machine for $L_1 = \{w\#0^n|w \text{ is a suffix of some $x$ in $L$ with } |x|=n\}$
Let us describe an NTM $N$ that computes $L_1$ in polynomial time. The machine "guesses" the first $n - |w|$ letters of a word $x'$ (it makes all possible guesses non-deterministicly) and append $w$ to $x'$ then it simulates $M$ on the resulting word. If $M$ accepts on any of the guesses the machine $N$ halts and accepts. If all reject, $N$ also rejects.

Since, we have $n$ zeroes as a part of the input, the guesses are done in linear time in the size of the input. The simulation also runs in polynomial time in an NTM by assumption, hence, we get a total polynomial running itme and hence, $L_1$ is in NP. The correctness of $N$ is straight forward.