Compact chainrings

Is it possible to just switch chainrings on Shimano ultra? from 54x39 to compact 50x34. Do I need to change anything else?

No, the crank’s spider is too large put smaller then 39 (or somtimes 38) inner rings on it. You would have to change to a 110bcd (compact) crank.