Is it okay to give link of my recent paper in the cover letter for a postdoc application?
While I've only been on the applicant side of things, I expect that it would be fine to include a link. Different PIs will react differently, of course, but it seems unlikely to ruin your application. Just make it clear from typesetting that it is a link. Given that the PI might only look at the printed version you should probably make the link text self-explanatory as well, e.g. using an arXiv identifier. However, depending on the method of submission you might be able to just attach the preprint of interest to your application. I expect that this is the ideal approach, when possible.
As support for using links, see this Nature Jobs blog post
When you’re reading an article online you’ll often find links to relevant content that is outside the article. This technique can be used in your cover letter too. Use links to information such as your research lab website, or your online portfolio and research papers. You can even link to specific papers that have been highly cited or extra-curricular projects you’ve been a part of. Let the employer know that there is so much more to you that what appears on that flat piece of paper!