While the communication between your browser and Twitter is encrypted with HTTPS and also additionally in case of Shadowsocks, the messages you publish can be seen by others - that's the point of Twitter. Depending on the content and time of these messages it might be possible to narrow down who might have send these messages. And the more messages you post and the more specific these are the better user profiling can be done.
Since the connections from within Iran to the outside can be monitored by the government they could in theory also align traffic behavior with selected new Twitter posts and from this get your IP address which can be associated with a specific ISP and this ISP knows the customer behind this IP. And again, the more you post the better profiling can be done.
Using Shadowsocks might protect you from some monitoring. But on the other hand using Shadowsocks or VPN can be detected too and can be considered suspicious behavior by its own. And while these technologies hide the endpoint of the connection (i.e. Twitter) they don't hide the sender and they don't hide traffic pattern. It is likely not impossible to use these information for profiling too.
Note that I'm not implying that everything which is possible will be actually done in practice. Even government agencies have only a limited amount of time and money so they will not be able to do everything which is possible in theory. And note that all of this is only about how digital traces you leave on the network can be used to detect too. But it might also be that you talk about your activity to friends and that these friends are not as trustworthy as you assumed. And there are also traces on your computer - see Serge's answer for more on this.