They are socket compatible: http://ark.intel.com/compare/75128,75117
Also, the i7-4800MQ supports VT-d where the i7-4700MQ does not.
However, you need to ask Lenovo if their BIOS supports the i7-4800MQ. Otherwise, you may find that it works, or only works partially, or does not work, or has damaged your motherboard.
This message was posted on behalf of Intel Corporation
Al Hill is right about this, the processor can similar and as well compatible with the socket but the BIOS in your laptop may not recognize the new processor and the laptop may never boot. You need to double check that your BIOS will support it. Some BIOS are very sensitive.