Merely means only as specified and nothing more; simply: merely a matter of form. So, yes, it can and does mean only, although there are times that merely could not correctly be substituted for only.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.