Technically, yes. Practically, I'd probably wait.
Websockets are definitely the way HTML5 does the type of communication we're used to. Technically, yes you can, but depending on the type of site you're building, you might want to hold off. Websockets is one of the newer pieces of the HTML5 spec and is still being finalized. It works in the newest versions of Chrome and Firefox 4, but IE9 doesn't have this implemented yet, and there's no word on if IE10 will have it either. Technical sites that show off the newest technology (like demoing what is possible in HTML5) and any other things where the vast majority of the audience will be guaranteed to use a supporting browser or are early adopters should be fine. If not, you may be alienating some users. Only you can decide which way to go.
The key here is that Websockets is a changing spec currently, and AJAX works in both old and new browsers. If you want backwards compatable in addition to a guarantee the spec and browsers won't change tomorrow and break your exisisting code, use AJAX. If you're cool with a slight possibility that the spec and browser implementations may change in the future and don't care about people using older browsers, then use websockets.
Another stackoverflow answer shows websocket support:
- Chrome 4.0 supports Websockets.
- Safari 5.0.2 supports them too
- Firefox 4.0 ships with support for WebSockets disabled. to enable it see
- Opera 11 ships with support disabled to re-enable it see
- IE9 does not support them, however an add-on offers experimental support