Indeed you can. Just make sure you are standing in the "Foreigners" line and not the "Lebanese" line and that's all you need to do. Of course, you will have to fill a landing card which should be handed to you on the plane (make sure you ask for one if the FAs don't hand them out for some reason). Keep your passport handy as it will be checked once again after you leave immigration and again at customs just before you exit the luggage claim area.
If you have any other questions, please feel free to ask. Otherwise, have a safe trip and enjoy your stay in Beirut.