Wick's theorem for matrix product states