Hi you can perform this with Below code
[formlightbox title="Send me a message" text="Contact me"]
[contact-form-7 id="401" title="Contact form 1"]
[/formlightbox]
For this you needs 2 plugins
(1) Contact Form 7
(2) Form Lightbox
you can check this at http://www.myphpmaster.com/form-lightbox-demo/