Yes, but make sure you know what your country's tax laws are. US companies can even hire foreign workers as employees, so long as the contract meets to requirements of each country's working laws (e.g. paid time off and minimum wage in the EU). In that case it's best to get an accountant that has done it before.