Hello,
I believe you can ,BUT in the long run you should have different ones, something like this…
Syslog TCP 5140
Syslog UDP 5141
I have in the past used the same ports but ran into more problems with port conflictions.
So I have made a chart for Graylog Port Reservations. I no longer use GL default ports for production use.
Hope that helps