I don't really want to spend the money on getting a lawyer to help me create lease agreements. Therefore is it ok if I just buy a lease agreement template online and use it?
I would strongly recommend against this. When you purchase a lease agreement template (or any other legal document template) you need to realize they may not apply to your local area. For example, it may be perfectly legal to ask and receive a security deposit from your tenants in one location and illegal in another. Other examples include rent control, the process of evicting tenants, how late fees on rents can be charged, etc.
Not only that but when was the template created? It's possible that since the template was created the laws have changed. Some templates are sold for years, long after they're obsolete.
There's nothing worse than trying to save a few dollars by buying a template only to later discover that it's worthless and holds no value, especially if you have to take your tenant to court.
Which is why I would always strongly recommend you get your lawyer to draft your leases. The good news is that once you have your first lease drafted, you can re-use it for a long time, assuming the laws don't change. Not only that, the ongoing fees of maintaining a lease with a lawyer are generally lower than the initial fees of drafting the lease.
As well, if you don't have too many customizations, most real estate lawyers will be able to draft a lease fairly quickly and inexpensively.