Yes, you can use the proceeds to immediately buy another stock or even the same stock if you wish. There is no need for you to wait 2 days for clearing. 



However if you wish to withdraw the funds, you must wait (T+2_ two business days after you sell to avail of its proceeds.