I know how to register a new file-type icon in SharePoint 2013 by modifying docicon.xml, but is it possible via any sort of web-based API? Specifically I'm trying to do it for a SharePoint Online/office 365 site.
Sorry, as far as I know, there is no out-of-the-box way to alter this file via web-based APIs. In an on-premise installation you could create a custom extension (for example, by extending the client object model as described here) to alter the data from the client side, but in this case I don't find it to be a good idea, and it is no option at all for O365.
Just to give another argument against your plan: altering the docicon.xml has no effect until the SharePoint web application process restarted (for example, via IISRESET). Although it is technically possible to restart the process from your custom code in on-premise mode, it is definitely against any best practices.