Yes, they can be welded together if done correctly.
A fabricator typically adds plates or stiffeners to create proper weld surfaces and ensure load transfer. The design should be checked by a structural engineer, since different shapes carry loads differently and may need reinforced connections.
