Yes, you can.
Smart contracts can issue arbitrary “inner transactions” from their “application accounts”.
To restrict transfer of the ASA, essentially, you would need the clawback address of the ASA to be application account.
You can look at ARC-20: Smart ASA and ARC-18: Royalty Enforcement Specification. There is also a full example implementing royalty: GitHub - algorand-devrel/royalty: Implementation of ARC18, which can be tweaked to be more general. (Note that the example is a bit old and does not use beaker, which I would now recommend to use, but this can also easily be changed.)
For the minting from the smart contract. See Asa-Application-creation - #11 by cusma