Arduino Mega - Communication Pin as INPUT or OUTPUT

Can i use them as Digital OUTPUT or INPUT without problem?

You have out permission. Whether you have problems, or not, depends on what you want to connect to the pins.