Yes - but you will need to run a new thermostat wire. With your setup, the thermostat wire you run will need three conductors. However, consider installing one with five conductors or more for a few extra dollars - helping to future-proof your wiring.
Old 'two-wire' thermostats worked like a switch. The house got cold, the thermostat made a connection, 24VAC was sent to the boiler until the warm house broke the connection.
Your new thermostat needs constant 24VAC (that's where the C wire comes in) as supplied by your transformer, and uses the third wire to communicate with the boiler heating relay. Thermostat uses the 24VAC to operate, and when there is a call for heat, it sends a 24VAC signal to the boiler.