Yes, you can apply for the Malaysia work visas while residing overseas. However, it is recommended that you have a local representative in Malaysia to liaise and talk to governmental officers if required.