@Niraj Gawli I can take a shot at this, but let me preface it by saying I highly suggest working with an attorney when you begin to negotiate the PSA. Wording and particulars in the PSA will be everything.
If you are making a non-binding offer, I think your way of wording is on the right track. Purchase price of $XX, subject to zoning contingency. Have a section in your offer that elaborates on the zoning contingency that effectively says that closing is subject to the approval of whatever you want (XXX SF, XXX FAR, XXX units, etc.) by the city of Somerville. You and the seller can agree to the premise of the deal with the LOI, and then iron out the particulars on the definition of "approval" with an attorney's help.
In terms of your questions about deposit, option payments, closing date - it all depends on the specific deal and how much leverage you have. You'll likely need to make a deposit but you should make the case that it doesn't go non-refundable until you get the zoning approval you need. I would propose closing to be a certain number of days following the approval. And I wouldn't propose option payments until the seller tells you they want them. All part of the negotiation.
Again, every deal is different and I tried to remain high level since I don't know the particulars of your deal. Happy to chat more about the particular deal if you'd like.