Wildcard ssl

i have more than 30 subdomains under my main domain name each of them is point to mikrotik server.
and main domain webserver is apache and control panel is cpanel/whm

i want to know can i use wildcard ssl to all subdomains and main website ?

theoretically you should be able to use the same ssl cert to multiple web servers if the are located in the same ip address but there is a problem…
using a dns server for resolving example.domain.com VS example2.domain.com should point to same ip and port so there is the problem: cannot share same ip and port.
maybe by using different ports for different instances of web servers could resolve that issue.
otherwise you need to use one web server and locate all your subdomains inside it in form of domain.com/sub1, domain.com/sub2...etc…
using multiple ip - domain combination is imposible and should be considered a security issue.

wildcard ssl is for *.domain.com assigned to a static ip.

This really has nothing to do with MikroTik.

Refer to your Apache documentation for Virtual Hosting. A wildcard cert can by used for any number of subdomains on the same IP and same port, or on different IPs.