The Spanish government's official representative in Catalonia has apologised for the violent response by police during the banned secession referendum on Sunday.