Is it possible to shoot with a 55mm lens so that you have both the close objects and the background objects (like buildings situated half a mile away) clear?
I assume that by "clear", you mean sharp.
The answer depends on what distance you consider "close" and how sharp is "clear" enough for you. You could use an online depth of field calculator to check what's feasible.
For example, using f/22 and focusing at hyperfocal distance (23 feet) on a Canon 1.6 crop body, your depth of field starts at about 12 feet, so this is the closest distance you can have sharp with this lens and aperture.
If you want to avoid loss of overall sharpness due to diffraction, you should open the aperture to about f/11 and that leaves 23 feet as the closest distance (focusing at hyperfocal distance - 46 feet).
Of course, those are not hard numbers - transition from sharp to non-sharp is gradual, and you might be able to position your front subject closer or be forced to move further depending on how much blur you are willing to accept.