Not really,
The SMPS has an output that is regulated DC, the transformer has AC output.
Once rectified and filtered the output voltage from the transformer will be much higher (probably around 36V) and this can vary with line voltage (so maybe ±10%)
If unregulated the DC voltage from the transformer will vary with load.
The ripple frequency from the SMPS will be much higher and the ripple voltage much lower than that from the transformer (if rectified and filtered)
The maximum DC current you should draw from the transformer is around 1.414A (sounds like the square root of 2 doesn't it? -- it's actually the AC current rating (2A) divided by sqrt(2)).
To get 24VDC from the transformer you would require a regulator, if we assume you use a linear regulator then it will give you 24V at 1.4A, and dissipate about 10W to 15W of heat. This is more heat than the SMPS is likely to dissipate even when running at full capacity (4A)
So, probably you won't be OK.